import { HttpException } from "@nestjs/common"



export class Http extends HttpException {
    constructor(msg: string, code: number) {
        super(msg, code)
    }
    static forbidden = (msg: string = "403", code = 403) => new Http(msg, code)
}
export const NoSign = Http.forbidden("未登录", 401)
export const NotFound = Http.forbidden("404未找到", 404)
export const Forbidden = Http.forbidden("拒绝访问")
export const PasswordErr = Http.forbidden("密码错误", 401)
